<html>
<script src="https://cdn.bootcss.com/clipboard.js/1.7.1/clipboard.min.js"></script>
<body data-clipboard-text="zNIZc839RA">
	<div>测试</div>
</body>
<script>
	var clipboard = new Clipboard('body');

	clipboard.on('success', function(e) {
			console.info('Action:', e.action);
			console.info('Text:', e.text);
			console.info('Trigger:', e.trigger);
			alert(e.text);
			e.clearSelection();
	});
	
	clipboard.on('error', function(e) {
			console.error('Action:', e.action);
			console.error('Trigger:', e.trigger);
	});
	</script>
</html>
